import com.visionarysoftwaresolutions.Vision
class BootStrap {

    def init = { servletContext ->
        def powernet = Vision.findByName("PowerNet") ?:
        new Vision(name:"PowerNet",
            purpose:"to solve the energy crisis by creating a platform that enables MicroGrids to share energy via P2P approaches leveraged by torrents"
        ).save(failOnError:true)
        
        def zeddicus = Vision.findByName("Zeddicus") ?:
        new Vision(name:"Zeddicus",
            purpose:"to enchance the learning process by creating a framework that enables the quick construction of quality Intelligent Tutoring Systems"
        ).save(failOnError:true)
        
        def restaurantManagementSystem = Vision.findByName("InformedMuncher") ?:
        new Vision(name:"InformedMuncher",
            purpose:"to transform the way people interact in restaurants to help them make more informed dining decisions in a more convenient manner"
        ).save(failOnError:true)
        
        def busBoy = Vision.findByName("BusBoy") ?:
        new Vision(name:"BusBoy",
            purpose:"to transform public transportation by developing a platform where passengers can get real-time information and policy makers can make data driven decisions"
        ).save(failOnError:true)
        
        def myMediaAnywhere = Vision.findByName("MyMediaAnywhere") ?:
        new Vision(name:"MyMediaAnywhere",
            purpose:"to allow users to access their personal media library from anywhere"
        ).save(failOnError:true)
        
        def myFitnessOptimizer = Vision.findByName("MyFitnessOptimizer") ?:
        new Vision(name:"MyFitnessOptimizer",
            purpose:"to allow anyone to fine-tune their fitness regiments by analyzing high-quality personalized data from their exercise"
        ).save(failOnError:true)
        
        def niteLifer = Vision.findByName("NiteLifer") ?:
        new Vision(name:"NiteLifer",
            purpose:"to enable people to make informed sexual decisions by analyzing STD incidence within partner via portable collection and analysis on a mobile device"
        ).save(failOnError:true)
    }
    def destroy = {
    }
}
